﻿using System.Collections.Generic;


namespace mds.DataAccessService
{
   public class DatabaseAdapter
    {
        private static DatabaseAdapter _instance = new DatabaseAdapter();

        public static DatabaseAdapter Instance
        {
            get { return _instance; }
         
        }
        private Dictionary<EnumDatabaseType, IDatabase> _databaseDic;
       private DatabaseAdapter()
       {
           _databaseDic = new Dictionary<EnumDatabaseType, IDatabase>();
          // _databaseDic.Add(EnumDatabaseType.SqlServer,new SqlServerDatabase);
       }
      public IDatabase CreateDatabase(EnumDatabaseType databaseType)
       {
           if (_databaseDic.ContainsKey(databaseType))
               return _databaseDic[databaseType];
           else
               return null;
       }
    }
}
